-
Notifications
You must be signed in to change notification settings - Fork 5.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Data] Refactor some file-related unit tests #48228
Conversation
Signed-off-by: Balaji Veeramani <bveeramani@berkeley.edu>
Signed-off-by: Balaji Veeramani <bveeramani@berkeley.edu>
error_message = "No input files found to read" | ||
with pytest.raises(ValueError, match=error_message): | ||
ray.data.read_csv(path3, file_extensions=["csv"]).schema() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We shouldn't test that this raises a value error, because returning an empty dataset is also valid
@@ -846,7 +813,7 @@ def test_csv_read_with_column_type_specified(shutdown_only, tmp_path): | |||
Version(pa.__version__) < Version("7.0.0"), | |||
reason="invalid_row_handler was added in pyarrow 7.0.0", | |||
) | |||
def test_csv_invalid_file_handler(shutdown_only, tmp_path): | |||
def test_csv_invalid_file_handler(ray_start_regular_shared, tmp_path): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we update other tests to use ray_start_regular_shared
instead of shutdown_onl
? e.g. test_csv_read_with_column_type_specified
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, we should. Can do in a follow-up PR if/when I have time
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Follow-up here: #48352
See #48228 (comment). Signed-off-by: Balaji Veeramani <bveeramani@berkeley.edu>
This PR refactors several unit tests to simplify them and make them less brittle (e.g., by parameterizing inputs or removing ordering assumptions). Signed-off-by: Balaji Veeramani <bveeramani@berkeley.edu>
…#48352) See ray-project#48228 (comment). Signed-off-by: Balaji Veeramani <bveeramani@berkeley.edu>
This PR refactors several unit tests to simplify them and make them less brittle (e.g., by parameterizing inputs or removing ordering assumptions). Signed-off-by: Balaji Veeramani <bveeramani@berkeley.edu>
…#48352) See ray-project#48228 (comment). Signed-off-by: Balaji Veeramani <bveeramani@berkeley.edu>
This PR refactors several unit tests to simplify them and make them less brittle (e.g., by parameterizing inputs or removing ordering assumptions). Signed-off-by: Balaji Veeramani <bveeramani@berkeley.edu> Signed-off-by: mohitjain2504 <mohit.jain@dream11.com>
…#48352) See ray-project#48228 (comment). Signed-off-by: Balaji Veeramani <bveeramani@berkeley.edu> Signed-off-by: mohitjain2504 <mohit.jain@dream11.com>
Why are these changes needed?
This PR refactors several unit tests to simplify them and make them less brittle (e.g., by parameterizing inputs or removing ordering assumptions).
Related issue number
Checks
git commit -s
) in this PR.scripts/format.sh
to lint the changes in this PR.method in Tune, I've added it in
doc/source/tune/api/
under thecorresponding
.rst
file.